package com.shanshan.system.controller;


import com.shanshan.system.entity.MeetingSummary;
import com.shanshan.system.service.IMeetingSummaryService;
import com.shanshan.system.vo.NoticeVo;
import com.shanshan.system.vo.Result;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author shanshan
 * @since 2023-01-31
 */
@RestController
@RequestMapping("/system/meetingSummary")
@Api(tags = "菜单")
public class MeetingSummaryController {

    @Autowired
    private IMeetingSummaryService meetingSummaryService;
    /**
     * 通知列表
     * @param currentPage 当前页面
     * @param pageSize    页面大小
     * @return {@link Result}
     */
    @RequestMapping("/list")
    public Result meetingSummaryList(@RequestParam(defaultValue = "1") int currentPage, @RequestParam(defaultValue = "5") int pageSize, @RequestBody NoticeVo noticeVo){
        return meetingSummaryService.queryAllNotice(currentPage,pageSize,noticeVo);
    }

    /**
     * @param meetingSummary:
     * @return Result
     * @description 添加会议纪要
     */
    @PostMapping("/add")
    public Result addMeetingSummary(@RequestBody MeetingSummary meetingSummary){
        return meetingSummaryService.addMeetingSummary(meetingSummary);
    }

}
